home *** CD-ROM | disk | FTP | other *** search
- #include <string.h>
- #include <stdio.h>
- #include "common.h"
-
- char *next_string(FILE *f){
- static char s[120];
- char *s1;
- int i;
-
- do {
- if feof(f) return("");
- fgets(s, 120, f);
- }
- while(s[0] == ';'); //skip comment strings
-
- s1 = strchr(s,';');
- if (s1 == NULL) i = strlen(s) -1;
- else i = s1-s;
- //kill comment and spaces
- while (((s[i]==' ') || (s[i]=='\t')) && (i-- > 0)) s[i] = '\x0';
- return(s);
- }
-
-
-